package com.ericsson.enap.modules.monitor.job;

import com.ericsson.common.quartz.job.MainJob;
import com.ericsson.common.quartz.job.ManualQuartzJob;
import com.ericsson.common.quartz.service.QuartzTableManager;
import com.ericsson.enap.modules.monitor.task.CabSwitchDataTask;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * 交换机数据获取（Version，ALARM，INTERFACE，INTERFACE DETAIL，VLAN，ROUTE）
 */
@Component
public class CabSwitchDataJob implements MainJob {

    @Autowired
    QuartzTableManager quartzTableManager;
    @Autowired
    CabSwitchDataTask capSwitchDataTask;
    String jobName="CabSwitchDataJob";
    @Override
    public void doTask() {
        //System.out.println("CabSwitchDataJob start.....");
        //capSwitchDataTask.execute();
        quartzTableManager.addManualTaskJob(jobName,jobName,jobName,jobName, ManualQuartzJob.class,"0 0/15 * * * ?",capSwitchDataTask);
    }

}
